while [ -n "$1" ]
do
	#echo $1
	if ! [ -e "$1" ]; then 
		echo $1 doesn\'t exist
	elif ! [ -r "$1" ]; then
		echo $1 can\'t be read
	elif [ -f "$1" ]; then
		echo $1
		cat $1
	elif [ -d "$1" ]; then
		echo $1
		ls $1
	fi
	shift
done
